package cn.silver.module.configuration.mapper;

import cn.silver.framework.mybatis.mapper.BusMapperPlus;
import cn.silver.module.configuration.domain.SysDictItem;
import cn.silver.module.configuration.bean.DictItemBean;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 字典表 数据层
 *
 * @author Silver Zhou
 */
@Mapper
public interface SysDictItemMapper extends BusMapperPlus<SysDictItem, DictItemBean> {

    default List<DictItemBean> selectDictDataByType(String dictType) {
        return selectVoList(new LambdaQueryWrapper<SysDictItem>().eq(SysDictItem::getType, dictType).orderByAsc(SysDictItem::getSort));
    }
}
